#include "seqstack.h"

Status Push(SqStack *s, SElemType e)
{
    if (s->top == MAXSIZE - 1)
    {
        return ERROR;
    }

    s->top++;
    s->data[s->top] = e;
    return OK;
}

Status Pop(SqStack *s, SElemType *e)
{
    if (s->top == -1)
    {
        return ERROR;
    }

    *e = s->data[s->top];
    s->top--;
    return OK;
}
